package com.jiang.core.common;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;


@Data
@ApiModel("PageHelper")
public class PageHelper<T> {

    @ApiModelProperty("当前页")
    private long currentPage;

    @ApiModelProperty("总数")
    private long total;

    @ApiModelProperty("每页条数")
    private long pageSize;

    @ApiModelProperty("记录")
    private List<T> list;

    public PageHelper(long currentPage, long total, long pageSize, List<T> list) {
        this.currentPage = currentPage;
        this.total = total;
        this.pageSize = pageSize;
        this.list = list;
    }

    public PageHelper(long currentPage, long pageSize, List<T> list) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
        this.list = list;
    }
}